<template>
  <view class="view_box">
    <navBar :navbarData.sync="navbarData"></navBar>
		<view>
			<img class="survey_top_img" src="https://100000063-1252208446.file.myqcloud.com/images/macallan-remvp/survey/survey_top_img.jpg" />
		</view>
		<!-- 弱提示 弹窗 -->
		<toast-popup ref="toastPopup" @onToastPopupClick="onToastPopupClick"></toast-popup>
  </view>
</template>

<script>
  import api from '@/api/api';
  import {
    SEL_CLASS_CODE,
    SEL_ACTIVE_CODE,
    SYSTEM_INFO,
    USER_INFO,
    CUSTOMER_INFO,
    CUSTOMER_HOTFIX,
    CART_KEY,
    MERCHANT_INFO,
    USER_SPECICAL_INFO
  } from '@/utils/constant';
  import NavBar from '../../components/common/navbar';
  export default {
    components: {
      navBar: NavBar
    },
    data() {
      return {
        navbarData: {
          showCapsule: 0, //是否显示左上角图标   1表示显示    0表示不显示
          title: '',
          navbarTitle: '',
					isTopFixed: true
        },

        shareImage: '',
        shareTitle: '',
        pagePath: '',
        pageQuery: '',
      };
    },
    async onLoad(option) {
      
    },
    onShow() {
      
    },
    onUnload() {},
    onHide() {},
    methods: {
			/**
			 * 展示弱提示
			 * @param {Object} msg 文案
			 */
			handleShowTextToast(msg){
				try{
					this.$refs.toastPopup.showToast(msg);
				}catch(e){}
			},
			/**
			 * 若提示按钮点击回调
			 * @param {Object} data.type 类型：confirm确定，cancel取消
			 * @param {Object} data.callBackData 呼气弹窗时传入的数据
			 */
			onToastPopupClick(data){},
      onShareAppMessage(res) {
        let that = this
        if (res.from === 'button') {} else {
          this.$EFSTracking.trackingAction('SHARE_CARD', res.from, {});
        }
        let imageUrl = this.shareImage;
        let path = this.pageQuery ? `/${this.pagePath}?${this.pageQuery}` : `/${this.pagePath}`;
        let title = this.shareTitle;
        this.$commonSensors.sensorsPageShare();
				this.$sr.setContext({ share_title: title || 'THE MACALLAN EBOUTIQUE麦卡伦' });
        return this.$commonFunction.commonShare(res, this.shareTitle, path, this.shareImage);
      },
      onShareTimeline() {
				const title = this.shareTitle ? this.shareTitle : uni.getStorageSync('storeName') || 'THE MACALLAN EBOUTIQUE麦卡伦';
				this.$sr.setContext({ share_title: title || 'THE MACALLAN EBOUTIQUE麦卡伦' });
        return {
          title: title,
          query: this.pageQuery,
          imageUrl: this.shareImage
        };
      },
    }
  }
</script>

<style lang="less">
  .view_box {
    position: relative;
  }
	.survey_top_img{
		width: 750rpx;
		height: 616rpx;
	}
</style>
